home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 6018 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: keats.ugrad.cs.ubc.ca!not-for-mail
  2. From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: VAX has Sethost.log, DOS has ????
  5. Date: 21 Feb 1996 10:22:32 -0800
  6. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  7. Message-ID: <4gfnt8INNbor@keats.ugrad.cs.ubc.ca>
  8. References: <4gbh10$649@hermes.louisville.edu>
  9. NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
  10.  
  11. In article <4gbh10$649@hermes.louisville.edu>,
  12. Andy Record <adrecoz1@ulkyvm.louisville.edu> wrote:
  13.  >Hello everybody,    
  14.  > 
  15.  >    VAX has a command that lets the user capture everything written to the
  16.  >screen, regardless of if the keyboarder typed it in or if a program
  17.  >writes it to the screen, to a sethost.log file (a text file).  I was
  18.  >trying to make something that would do the same in DOS.  Does anybody
  19.  >know of a program that does this, or have snippets of source code that
  20.  >might help me...?    
  21.  
  22. You can't do it easily. For one thing, there is no multitasking. Writing
  23. ``background'' programs involves severe hackery.
  24.  
  25. Secondly, most DOS programs write directly to the screen memory, rather than
  26. via an output stream that you can capture.
  27.  
  28. Thirdly, you can't do it with pipes, because DOS's pipes are not concurrent.
  29. Something like UNIX's "telnet <host> | tee <logfile>" can't work, because pipes
  30. are done using intermediate temporary files. There is no way to open a
  31. co-process that concurrently reads the output of another process.
  32. -- 
  33.  
  34.